home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 22
/
Aminet 22 (1997)(GTI - Schatztruhe)[!][Dec 1997].iso
/
Aminet
/
util
/
misc
/
hcmenu.lha
/
HCMenu
/
HCMenu_Install
next >
Wrap
Text File
|
1997-10-14
|
10KB
|
352 lines
;HCMenu and HCMenuEditor Installscript by E. Th van den Oosterkamp
;-----------------------------------------------------------------------------
(SET @app-name "HCMenu")
(SET @default-dest "SYS:")
(SET Result 1)
(SET KickVer (GETVERSION))
(SET KickVer (/ KickVer 65536))
(SET NewEnvArc 1)
(WELCOME " Welcome to the HCMenu/HCMenuEditor installation\n\n"
" Copyright 1997 by E Th van den Oosterkamp\n\n"
)
;----------------------- Opvragen van doel-directory -------------------------
(SET DestDir
(ASKDIR (prompt "Select the directory where you want to put the executables.")
(help "In the selected directory a subdirectory with the "
"name \"HCMenu\" will be created. In this subdirectory "
"all files will be installed...\n\n"
@askdir-help)
(default @default-dest)
(disk)
)
)
(SET DestDir (TACKON DestDir "HCMenu"))
(SET @default-dest DestDir)
(MAKEDIR DestDir (infos))
;----------------------- Opvragen van te installeren items -------------------
(SET Sel_Menu 0)
(SET Sel_Edit 1)
(SET Sel_Example 2)
(SET Sel_Libs 3)
(SET InstallMask
(ASKOPTIONS
(prompt "Please select what to install")
(help "Now you can select what you want to install in the \""
DestDir "\" directory:\n\n"
"HCMenu V1.8 - The menu and the documents.\n"
"HCMenuEditor V1.1 - The MenuEditor and documents.\n"
"Example Menus - Some menufile examples.\n"
"Libraries - Some external libraries\n\n"
"NOTE: The libraries installed are publicdomain libraries "
"I don not guarranty to have the latest version!\n\n"
@askoptions-help)
(choices "HCMenu V1.8" "HCMenuEditor V1.0" "Example menus" "libraries")
(default %1111)
)
)
(IF (NOT InstallMask)
(SET Einde "Nothing to install!?? In that case: I'm ready.")
)
;----------------------- Vragen overschrijven bestaand environment ----------
(IF (OR(EXISTS "ENVARC:HCMenu/FirstMenu")(EXISTS "ENVARC:HCMe/MenuPath"))
(
(SET NewEnvArc
(ASKBOOL
(prompt "An HCMenu/HCMenuEditor environment was found! "
"Delete it and install a new environment?")
(help "Both the HCMenu and the HCMenuEditor use environment "
"variables to store information. Probably these variables "
"are already used by an other HCMenu or HCMenuEditor "
"installation.\nNow you may decide if the old environment "
"should be deleted by installing the new environment, or "
"if you want to keep the old environment.\n\nPS: When the "
"new environment uses more variables and you chose for keeping "
"the old environment, the new ones are added anyway. This will "
"make the upgrading to a new environment friendlier...")
(choices "Delete & Install" "Keep the old")
)
)
))
;=============================================================================
;======================= Installeren van het HCMenu ==========================
;=============================================================================
(IF (IN InstallMask Sel_Menu)
(
(COPYLIB
(prompt "Copying the HCMenu executable")
(help @copylib-help)
(source "Program/HCMenu")
(dest DestDir)
(infos)
(confirm)
(optional "force")
(optional "askuser")
)
(MAKEDIR
(TACKON DestDir "Doc")
(infos)
)
(COPYFILES
(prompt "Copying the English HCMenu documents")
(help @copyfiles-help)
(source "Doc/English/HCMenu.Doc")
(dest (TACKON DestDir "Doc/English"))
(infos)
(optional "force")
(optional "askuser")
)
(COPYFILES
(prompt "Copying the Dutch HCMenu documents")
(help @copyfiles-help)
(source "Doc/Nederlands/HCMenu.Doc")
(dest (TACKON DestDir "Doc/Nederlands"))
(infos)
(optional "force")
(optional "askuser")
)
(SET Einde "HCMenu V1.8 was installed succesfully.\n")
;----------------------- Aanmaken van FirstMenu-prefs van HCMenu -------------
(MAKEDIR
(TACKON DestDir "MenuFiles")
(infos)
)
(IF (OR NewEnvArc (NOT(EXISTS "ENVARC:HCMenu/FirstMenu")))
(
(MAKEDIR "ENVARC:HCMenu")
(IF (EXISTS "ENVARC:HCMenu/FirstMenu")
(DELETE "ENVARC:HCMenu/FirstMenu"
(prompt "HCMenu environment file already exists!")
(optional "force")
(optional "askuser")
)
)
(TEXTFILE
(prompt "Setting up HCMenu environment")
(dest "ENVARC:HCMenu/FirstMenu")
(append (TACKON DestDir "MenuFiles/Main.Menu"))
)
(SET Einde (CAT Einde "including the HCMenu environment.\n\n"))
))
;----------------------- Aanmaken van Editor-prefs van HCMenu ----------------
(IF (IN InstallMask Sel_Edit)
(
(IF (OR NewEnvArc (NOT(EXISTS "ENVARC:HCMenu/Editor")))
(
(IF (EXISTS "ENVARC:HCMenu/Editor")
(DELETE "ENVARC:HCMenu/Editor"
(prompt "HCMenu environment file already exists!")
(optional "force")
(optional "askuser")
)
)
(TEXTFILE
(prompt "Setting up HCMenu environment")
(dest "ENVARC:HCMenu/Editor")
(append (TACKON DestDir "HCMenuEditor"))
)
))
))
))
;=============================================================================
;======================= Installeren van de MenuEditor =======================
;=============================================================================
(IF (< KickVer 36)
(
(SET Result
(ASKBOOL
(prompt "The HCMenuEditor needs KickStart 2.0 or higher! "
"Install it anyway?")
(help "The HCMenuEditor is about to be installed on a "
"machine using a V" KickVer " KickStart. Onfortunately "
"the HCMenuEditor needs Kickstart V36 or higher. Since the "
"HCMenuEditor will not work on this machine it is "
"up to you to decide to install or not...")
(choices "Install" "Cancel")
)
)
(IF (NOT Result)
(SET Einde (CAT Einde "HCMenuEditor V1.0 was NOT installed!\n"
"It needs KickStart 2.0 or higher!\n\n")
)
)
))
(IF (AND (IN InstallMask Sel_Edit) Result)
(
(COPYLIB
(prompt "Copying the HCMenuEditor executable")
(help @copylib-help)
(source "Program/HCMenuEditor")
(dest DestDir)
(infos)
(confirm)
(optional "force")
(optional "askuser")
)
(MAKEDIR
(TACKON DestDir "Doc")
(infos)
)
(MAKEDIR
(TACKON DestDir "MenuFiles")
(infos)
)
(COPYFILES
(prompt "Copying the English HCMenuEditor documents")
(help @copyfiles-help)
(source "Doc/English/HCMenuEditor.Guide")
(dest (TACKON DestDir "Doc/English"))
(infos)
(optional "force")
(optional "askuser")
)
(COPYFILES
(prompt "Copying the Dutch HCMenueditor documents")
(help @copyfiles-help)
(source "Doc/Nederlands/HCMenuEditor.Guide")
(dest (TACKON DestDir "Doc/Nederlands"))
(infos)
(optional "force")
(optional "askuser")
)
(IF (= @language "nederlands")
(SET DefTaal 1)
)
(SET DocTaal
(ASKCHOICE
(prompt "Install which on-line help language?")
(help "Here you can select the language used in the "
"on-line help of the HCMenuEditor. \n\n"
@askchoice-help)
(choices "English" "Nederlands")
(default DefTaal)
)
)
(SET Taal_UK 0)
(SET Taal_NL 1)
(IF (= DocTaal Taal_UK)
(COPYFILES
(prompt "Installing the English HCMenuEditor on-line help")
(help @copyfiles-help)
(source "Doc/English/HCMenuEditor.Guide")
(dest DestDir)
(newname "Me.Guide")
(optional "force")
(optional "askuser")
)
)
(IF (= DocTaal Taal_NL)
(COPYFILES
(prompt "Installing the Dutch HCMenuEditor on-line help")
(help @copyfiles-help)
(source "Doc/Nederlands/HCMenuEditor.Guide")
(dest DestDir)
(newname "Me.Guide")
(optional "force")
(optional "askuser")
)
)
(SET Einde (CAT Einde "HCMenuEditor V1.0 was installed succesfully.\n"))
;----------------------- Aanmaken van MenuPath-prefs van HCMenu ----------------
(IF (OR NewEnvArc (NOT(EXISTS "ENVARC:HCMe/MenuPath")))
(
(MAKEDIR "ENVARC:HCMe")
(IF (EXISTS "ENVARC:HCMe/MenuPath")
(DELETE "ENVARC:HCMe/MenuPath"
(optional "force")
(optional "askuser")
)
)
(TEXTFILE
(prompt "Setting up HCMenuEditor environment")
(dest "ENVARC:HCMe/MenuPath")
(append (TACKON DestDir "MenuFiles"))
)
))
;----------------------- Aanmaken van MenuPattern-prefs van HCMenu ----------------
(IF (OR NewEnvArc (NOT(EXISTS "ENVARC:HCMe/MenuPattern")))
(
(IF (EXISTS "ENVARC:HCMe/MenuPattern")
(DELETE "ENVARC:HCMe/MenuPattern"
(optional "force")
(optional "askuser")
)
)
(TEXTFILE
(prompt "Setting up HCMenuEditor environment")
(dest "ENVARC:HCMe/MenuPattern")
(append "#?.Menu")
)
))
(SET Einde (CAT Einde "including the HCMenuEditor environment.\n\n"))
))
;=============================================================================
;======================= Installeren van de MenuExamples =====================
;=============================================================================
(IF (IN InstallMask Sel_Example)
(
(MAKEDIR
(TACKON DestDir "MenuFiles")
(infos)
)
(COPYFILES
(prompt "Copying the Example menus")
(help @copyfiles-help)
(source "Examples")
(dest (TACKON DestDir "MenuFiles"))
(all)
(infos)
(optional "force")
(optional "askuser")
)
(SET Einde (CAT Einde "Example MenuFiles were installed succesfully.\n\n"))
))
;=============================================================================
;======================= Installeren van enkele bibliotheken =================
;=============================================================================
(IF (IN InstallMask Sel_Libs)
(
(COPYLIB
(prompt "Copying Reqtools.library")
(help @copylib-help)
(source "libs/ReqTools.Library")
(dest "LIBS:")
(infos)
(confirm)
(optional "force")
(optional "askuser")
)
(COPYLIB
(prompt "Copying PowerPacker.library")
(help @copylib-help)
(source "libs/PowerPacker.Library")
(dest "LIBS:")
(infos)
(confirm)
(optional "force")
(optional "askuser")
)
))
(EXIT Einde)